<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">开仓时间</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="open_time" class="layui-input" readonly lay-reqtext="请输入开仓时间" placeholder="请输入开仓时间" value="{$row.open_time}" id="open_time"/>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">平仓时间</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="close_time" class="layui-input" readonly lay-reqtext="请输入平仓时间" placeholder="请输入平仓时间" value="{$row.close_time}" id="close_time"/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">个股代码/商品</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="stocks" class="layui-input"  lay-reqtext="请输入个股代码" placeholder="请输入个股代码" value="{$row.stocks}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">开仓价</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="open_price" class="layui-input"  lay-reqtext="请输入开仓价" placeholder="请输入开仓价" value="{$row.open_price}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">类型</label>
            <div class="layui-input-block">
                <select name="type">
                    {foreach $typeList as $vo}
                    <option value="{$vo.value}" {if $row.type==$vo.value}selected=""{/if}>{$vo.title}</option>
                    {/foreach}
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">仓位</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="position" class="layui-input"  lay-reqtext="请输入仓位" placeholder="请输入仓位" value="{$row.position}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">止损价</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="stop_loss_price" class="layui-input"  lay-reqtext="请输入止损价" placeholder="请输入止损价" value="{$row.stop_loss_price}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">止盈价</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="stop_surplus_price" class="layui-input"  lay-reqtext="请输入止盈价" placeholder="请输入止盈价" value="{$row.stop_surplus_price}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">利润点位</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="profit" class="layui-input"  lay-reqtext="请输入利润点位" placeholder="请输入利润点位" value="{$row.profit}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">分析师</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="analyst" class="layui-input"  lay-reqtext="请输入分析师" placeholder="请输入分析师" value="{$row.analyst}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">平仓价</label>
            <div class="layui-input-block">
                <input autocomplete="off" type="text" name="close_price" class="layui-input"  lay-reqtext="请输入平仓价" placeholder="请输入平仓价" value="{$row.close_price}" />
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">策略依据</label>
            <div class="layui-input-block">
                <textarea name="strategic_basis" class="layui-textarea" placeholder="请输入策略依据">{$row.strategic_basis}</textarea>
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>

<script>   
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //日期时间范围
        laydate.render({
            elem: '#open_time'
            ,type: 'datetime'
        });
    })
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //日期时间范围
        laydate.render({
            elem: '#close_time'
            ,type: 'datetime'
        });
    })
  
</script>